#include "WAppManager.h"
#include "WRenderer.h"

#include "anttweakbar\AntTweakBar.h"

#include <iostream>

std::shared_ptr<WAppManager> WAppManager::instance = nullptr;

std::shared_ptr<WAppManager> WAppManager::Instance()
{
	if(WAppManager::instance == nullptr)
	{
		instance = std::shared_ptr<WAppManager>(new WAppManager());
		return instance;
	}

	return instance;
}


void WAppManager::RegisterParameter(std::string key, std::shared_ptr<IParameter> param)
{
	if(parameters.count(key) < 1)
	{
		std::pair<std::string, std::shared_ptr<IParameter>> keyPair = std::make_pair<std::string, std::shared_ptr<IParameter>>(key, param);
		parameters.insert(keyPair);

	}
	else
	{
		std::cout << "Parameter: " << key << " has already been registered." << std::endl;
	}
}